package com.lm.activemq.consumer;

import com.lm.activemq.config.ActiveMQConfig;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class TopicConsumer {

    @JmsListener(destination = ActiveMQConfig.TOPIC_NAME, containerFactory = "topicListenerFactory")
    public void receiveTopic(String text) {
        System.out.println("收到 Topic 消息：" + text);
    }
}
